@title backup data from local mongo database
@echo off & setlocal enabledelayedexpansion 

@echo initialize...
@echo.
@echo please make sure you have writen the database you want
@echo to backup to 'dblist.txt' in current directory.
@echo.
@echo start to backup...
@ping 127.0.0.1 -n 2 -w 1000 > nul

for /f %%i in (dblist.txt) do (
    mongodump -d %%i -o %cd%\backup
)

@ping 127.0.0.1 -n 3 -w 1000 > nul
@echo.
@echo "done! press any key to exit."
@pause > nul